package com.sduept.nwld.dataserver.model;


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.sduept.core.entity.IdentifiedObject;

@Entity
@Table(name="t_request_condition")
public class QueryCondition extends IdentifiedObject{

	/**
	 * 
	 */
	private static final long serialVersionUID = -3542263270805565776L;
	/**
	 * SoapHeader ID
	 */
	@Column(length=24,nullable=false)
	private String pid;
	
	/**
	 * 关联的conditionid
	 */
	private String referId;
	/**
	 * 增长的步长
	 */
	private String step;
	/**
	 * condition数据类型
	 */
	private String dataType;
	/**
	 * 初始值
	 */
	private String initValue;
	/**
	 * 当前值
	 */
	private String currentValue;
	/**
	 * 初始内容
	 */
	private String content;
	
	/**
	 * 关联的数据集，一个请求暂时只支持一个带数据集的查询条件，当一个请求中有带数据集的查询条件时，
	 * 数据集中个每一个数据和当前的其他条件构成总查询条件
	 * 先遍历数据集，然后执行其他条件的步长
	 */
	@Transient
	private QueryConditionDataSet queryDataSet;
	
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getPid() {
		return pid;
	}
	public void setPid(String pid) {
		this.pid = pid;
	}
	public String getStep() {
		return step;
	}
	public void setStep(String step) {
		this.step = step;
	}
	public String getDataType() {
		return dataType;
	}
	public void setDataType(String dataType) {
		this.dataType = dataType;
	}
	public String getInitValue() {
		return initValue;
	}
	public void setInitValue(String initValue) {
		this.initValue = initValue;
	}
	public String getCurrentValue() {
		return currentValue;
	}
	public void setCurrentValue(String currentValue) {
		this.currentValue = currentValue;
	}
	public String getReferId() {
		return referId;
	}
	public void setReferId(String referId) {
		this.referId = referId;
	}
		
	@Override
	public String toString(){
		return this.id;
	}
	public QueryConditionDataSet getQueryDataSet() {
		return queryDataSet;
	}
	public void setQueryDataSet(QueryConditionDataSet queryDataSet) {
		this.queryDataSet = queryDataSet;
	}
}
